package com.henu.main.util;

import java.util.concurrent.*;

public class MetricsUtil {

    public static BlockingQueue<Object> queue = new LinkedBlockingQueue<>();

    public static void push() {
        String os = System.getProperty("os.name");
        int thread;
        if (os.toLowerCase().startsWith("win")) {
            thread = 2;
        } else {
            thread = 2;
        }
        ExecutorService service = Executors.newFixedThreadPool(thread);
        for (int i = 0; i < thread; i++) {
            service.submit(new PushExecutor());
        }

    }

}
